The right-hand side type in the assignment, after the operation has been computed
The bound being violated
Lhs.max if rhs >= 0, Lhs.min otherwise.
1 auto x = checked!Saturate(short(100)); 2 x += 33000; 3 assert(x == short.max); 4 x -= 70000; 5 assert(x == short.min);
Implements saturation for operators +=, -=, *=, /=, %=, ^^=, &=, |=, ^=, <<=, >>=, and >>>=. This hook is called if the result of the binary operation does not fit in Lhs without loss of information or a change in sign.